#!/usr/bin/env python2
# -*- coding=utf-8 -*-
# Copyright 2012 CHEN Xing (cx@chenxing.name)
# Licensed under the terms of the BSD 3-Clause.

import sys
from webapp.webapp import WebApp

if __name__ == '__main__':
    nargs = len(sys.argv)
    if nargs == 1:
        from webapp.appbrowser.app_browser import AppBrowser
        AppBrowser.run()
    else:
        appFile = sys.argv[1]
        app = WebApp(appFile)
        app.run()
